﻿<%-- 
    Copyright (C) Binod Nepal, Planet Earth Solutions Pvt. Ltd., Kathmandu.
	Released under the terms of the GNU General Public License, GPL, 
	as published by the Free Software Foundation, either version 3 
	of the License, or (at your option) any later version.
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
    See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
--%>

<%@ Page Title="" Language="C#" MasterPageFile="~/Classifieds/Main.Master" AutoEventWireup="True"
    CodeBehind="CategoryView.aspx.cs" Inherits="MixNP.Web.Classifieds.CategoryView" %>

<asp:Content ID="Content1" ContentPlaceHolderID="StyleSheetContentPlaceHolder" runat="server">
    <style type="text/css">
        .mini-category-header
        {
            font-size: 18px !important;
        }
        
        .card-details
        {
            line-height: 135%;
        }
        
        
        
        .clearfix:after
        {
            content: ".";
            display: block;
            clear: both;
            visibility: hidden;
            line-height: 0;
            height: 0;
        }
        
        .clearfix
        {
            display: inline-block;
        }
        
        html[xmlns] .clearfix
        {
            display: block;
        }
        
        * html .clearfix
        {
            height: 1%;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ScriptsContentPlaceHolder" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="BodyContentPlaceHolder" runat="server">
    <h1>
        <asp:Literal ID="HeadingLiteral" runat="server" />
    </h1>
    <hr class="hr" />
    <h2>
        Filter
    </h2>
    <table>
        <tr>
            <td>
                Item Name is Like
            </td>
            <td>
                Price is Between
            </td>
            <td>
                City
            </td>
            <td>
                Sort By
            </td>
            <td>
            </td>
        </tr>
        <tr>
            <td style="vertical-align: middle;">
                <asp:TextBox ID="NameTextBox" runat="server" CssClass="textbox" />
            </td>
            <td style="vertical-align: middle;">
                <asp:TextBox ID="PriceFromTextBox" runat="server" CssClass="textbox" Style="width: 60px;"
                    TextMode="Number" />
                &nbsp;and&nbsp;
                <asp:TextBox ID="PriceToTextBox" runat="server" CssClass="textbox" Style="width: 60px;"
                    TextMode="Number" />
            </td>
            <td style="vertical-align: middle;">
                <pes:CityDropDownList ID="CityDropDownList1" runat="server" CssClass="dropdownlist"
                    Anywhere="true" />
            </td>
            <td style="vertical-align: middle;">
                <asp:DropDownList ID="SortByDropDownList" runat="server" CssClass="dropdownlist">
                    <asp:ListItem Text="Popularity" Value="0" />
                    <asp:ListItem Text="Least Price" Value="1" />
                    <asp:ListItem Text="Highest Price" Value="2" />
                    <asp:ListItem Text="Date Added" Value="3" />
                </asp:DropDownList>
            </td>
            <td style="vertical-align: middle;">
                <asp:Button ID="FilterButton" runat="server" Text="Filter View" OnClick="FilterButton_Click" />
            </td>
        </tr>
    </table>
    <webdiyer:AspNetPager ID="TopPager" runat="server" CssClass="pager" UrlPaging="True"
        PagingButtonType="Text" NumericButtonType="Text" NavigationButtonType="Text"
        ShowNavigationToolTip="true" ShowPageIndexBox="Never" ShowPageIndex="true" AlwaysShowFirstLastPageNumber="true"
        AlwaysShow="false" UrlPageIndexName="PageNumber">
    </webdiyer:AspNetPager>
    <div id="cards">
        <asp:Repeater ID="CardRepeater" runat="server">
            <ItemTemplate>
                <pes:ItemCard ID="ItemCard1" runat="server" ItemId='<%# Bind("ItemId") %>' />
            </ItemTemplate>
        </asp:Repeater>
        <asp:Literal ID="NothingLiteral" runat="server" />
    </div>
    <div style="clear: both;">
    </div>
    <webdiyer:AspNetPager ID="BottomPager" runat="server" CssClass="pager" UrlPaging="True"
        PagingButtonType="Text" NumericButtonType="Text" NavigationButtonType="Text"
        ShowNavigationToolTip="true" ShowPageIndexBox="Never" ShowPageIndex="true" AlwaysShowFirstLastPageNumber="true"
        AlwaysShow="false" UrlPageIndexName="PageNumber">
    </webdiyer:AspNetPager>
    <h2 class="tpad4">
        <a onclick="$('#categories').toggle(1000);scrollToBottom();">Related Categories</a>
    </h2>
    <div id="categories">
        <asp:Literal ID="CategoriesLiteral" runat="server" />
    </div>
    <asp:Panel ID="AlertPanel" runat="server">
        <h2>
            Alert Me
        </h2>
        Do you want to receive an email when some posts an item, under this category, matching
        the following criteria?

        <p>
            <input tabindex="5400" type="radio" name="AlertRadio" id="AlertYesRadio" value="Yes"
                onclick="$('#alert-container').show(1000);scrollToBottom();" />
            <label for="AlertYesRadio">
                Yes</label>
            <input tabindex="5400" type="radio" name="AlertRadio" id="AlertNoRadio" value="No"
                checked="checked" onclick="$('#alert-container').hide(1000);" />
            <label for="AlertNoRadio">
                No</label>
        </p>

        <div id="alert-container" style="display: none;">
            <hr class="hr" />
            <table>
                <tr>
                    <td>
                        City
                    </td>
                    <td>
                        Price Between
                    </td>
                    <td>
                    </td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <td>
                        <pes:CityDropDownList ID="AlertCityDropDownList" runat="server" CssClass="dropdownlist"
                            Anywhere="true" />
                    </td>
                    <td>
                        <asp:TextBox ID="AlertPriceFromTextBox" runat="server" CssClass="textbox" Style="width: 60px;"
                            TextMode="Number" />
                    </td>
                    <td style="vertical-align: middle;">
                        and
                    </td>
                    <td>
                        <asp:TextBox ID="AlertPriceToTextBox" runat="server" CssClass="textbox" Style="width: 60px;"
                            TextMode="Number" />
                    </td>
                </tr>
                <tr>
                    <td colspan="4">
                        <asp:Button ID="SaveButton" runat="server" Text="Save" OnClick="SaveButton_Click" CommandArgument="$('#AlertYesRadio').checked();" />
                    </td>
                </tr>
            </table>
        </div>
    </asp:Panel>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ScriptsContentPlaceHolderBottom"
    runat="server">
    <script type="text/javascript">
        $(window).load(function () {
            equalHeight($(".card"));
        });
    </script>
</asp:Content>